package dev.werillib.utils

import com.orhanobut.logger.AndroidLogAdapter
import com.orhanobut.logger.Logger

class Log {
    internal fun init(debug: Boolean) {
        if (debug) Logger.addLogAdapter(AndroidLogAdapter())
    }
}

fun d(obj: Any?) {
    Logger.d(obj)
}

fun d(message: String, vararg obj: Any?) {
    Logger.d(message, obj)
}

fun e(message: String, vararg obj: Any?) {
    Logger.e(message, obj)
}

fun e(throwable: Throwable?, message: String, vararg obj: Any?) {
    Logger.e(throwable, message, obj)
}

fun xml(xml: String?) {
    Logger.xml(xml)
}

fun json(json: String?) {
    Logger.json(json)
}